package com.yunyan.controller;


import com.yunyan.req.PredictParam;
import com.yunyan.resp.JsonResp;
import com.yunyan.service.PredictService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/predict")
public class PredictController {



    @Resource
    private PredictService predictService;

    @PostMapping("/sim")
    public JsonResp sim(@RequestBody PredictParam predictParam){
        return JsonResp.ok(predictService.simList(predictParam));
    }


    @GetMapping("/recommend/{userId}")
    public JsonResp recommend(@PathVariable String userId){
        return JsonResp.ok(predictService.recommend(userId));
    }
}
